<?php
/**
 * SocialEngine
 *
 * @category   Application_Standard
 * @package    Wall
 * @copyright  Copyright 2006-2010 YouNet Developments
 * @license    http://www.socialengine.net/license/
 * @version    $Id: manifest.php 1 2010-12-11 22:06:06Z longdt $
 * @author     Long
 */
$module = null;
$controller = null;
$action = null;
$request = Zend_Controller_Front::getInstance()->getRequest();
if (!empty($request))
{
    $module = $request->getModuleName();
    $action = $request->getActionName();
    $controller = $request->getControllerName();
}
if (empty($request) || !($module == "default" && $controller == "sdk" && $action == "build"))
{

    $modulesTable = Engine_Api::_()->getDbtable('modules', 'core');
    $mselect = $modulesTable->select()
            ->where('enabled = ?', 1)
            ->where('name  = ?', 'advcommentbox');
    if (count($modulesTable->fetchAll($mselect)) > 0)
    {
        $route = array('route' => 'advcommentbox/activity/comment', 'defaults' => array('module' => 'advcommentbox', 'controller' => 'activity', 'action' => 'comment',));
        Zend_Registry::set('USING_COMMENTBOX', 1);
    }
    else
    {
        $route = array('route' => 'activity/index/comment', 'defaults' => array('module' => 'wall', 'controller' => 'index', 'action' => 'comment',));
        Zend_Registry::set('USING_COMMENTBOX', 0);
    }
    ;
}

return array(
    // Package -------------------------------------------------------------------
    'package' => array(
        'type' => 'module',
        'name' => 'wall',
        'version' => '4.04p2',
        'revision' => '$Revision: 1 $',
        'path' => 'application/modules/Wall',
        'title' => 'Advanced Wall',
        'description' => 'Advanced Wall Activity Feed',
        'author' => 'YouNet Company',
        'dependencies' => array(
            array(
                'type' => 'module',
                'name' => 'core',
                'minVersion' => '4.1.2',
            ),
            array(
                'type' => 'module',
                'name' => 'younet-core',
                'minVersion' => '4.02p3',
            ),
        ),
        'actions' => array(
            'install',
            'enable',
            'disable'
        ),
        'callback' => array(
            'class' => 'Engine_Package_Installer_Module',
            'priority' => 4000,
        ),
        'directories' => array(
            'application/modules/Wall',
        ),
        'files' => array(
            'application/languages/en/wall.csv',
        ),
    ),
    // Items ---------------------------------------------------------------------
    'items' => array(
        'list',
        'listItem'
    ),
    // Routes --------------------------------------------------------------------
    'routes' => array(
        'wall_admin_settings_general' => array(
            'route' => 'admin/settings/wall/',
            'defaults' => array(
                'module' => 'wall',
                'controller' => 'admin-settings',
                'action' => 'general'
            )
        ),
        'wall_feed_overide' => array(
            'route' => 'widget/index/name/activity.feed',
            'defaults' => array(
                'module' => 'core',
                'controller' => 'widget',
                'action' => 'index',
                'name' => 'wall.feed',
            )
        ),
        'wall_comment_overide' => $route,
        'wall_share_overide' => array(
            'route' => '/activity/index/share/*',
            'defaults' => array(
                'module' => 'wall',
                'controller' => 'index',
                'action' => 'share',
            )
        ),
        'wall_list' => array(
            'route' => 'wall/list/:action/*',
            'defaults' => array(
                'module' => 'wall',
                'controller' => 'list',
                'action' => '(create|edit|delete)',
            ),
            'reqs' => array(
                'action' => '\D+',
            )
        ),
    )
)
?>
